import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from "../views/Main";
import ImportTemplateTest from "../views/ImportTemplateTest";
import CascaderTest from "../views/CascaderTest";
import BaiduMap from "../views/BaiduMap";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: Main
  },
  {
    path: '/main',
    name: 'Main',
    component: function () {
      return import('../views/Main.vue')
    },
    children: [
      {
        path: '/exportTest',
        name: 'ExportTest',
        component: function () {
          return import('../views/ExportTest.vue')
        }
      },
      {
        path: '/editorTest',
        name: 'EditorTest',
        component: function () {
          return import('../views/EditorTest.vue')
        }
      },
      {
        path: '/plainUploadTest',
        name: 'PlainUploadTest',
        component: function () {
          return import('../views/PlainUploadTest.vue')
        }
      },
      {
        path: '/avatarUploadTest',
        name: 'AvatarUploadTest',
        component: function () {
          return import('../views/AvatarUploadTest.vue')
        }
      },
      {
        path: '/searchForm',
        name: 'SearchForm',
        component: function () {
          return import('../components/SearchForm.vue')
        }
      },
      {
        path: '/wallUploadTest',
        name: 'WallUploadTest',
        component: function () {
          return import('../views/WallUploadTest.vue')
        }
      },
      {
        path: '/tomatoUploadTest',
        name: 'TomatoUploadTest',
        component: function () {
          return import('../views/TomatoUploadTest.vue')
        }
      },
      {
        path: '/overUploadTest',
        name: 'OverUploadTest',
        component: function () {
          return import('../views/OverUploadTest.vue')
        }
      },
      {
        path: '/transferTest',
        name: 'TransferTest',
        component: function () {
          return import('../views/Transfer.vue')
        }
      },
      {
        path: '/searchResetTest',
        name: 'SearchResetTest',
        component: function () {
          return import('../views/SearchResetTest.vue')
        }
      },
      {
        path: '/captChaTest',
        name: 'CaptChaTest',
        component: function () {
          return import('../views/CaptChaTest.vue')
        }
      },
      {
        path: '/exportExcel',
        name: 'ExportExcel',
        component: function () {
          return import('../components/ExportExcel.vue')
        }
      },
      {
        path: '/exportExcelTest',
        name: 'ExportExcelTest',
        component: function () {
          return import('../views/ExportExcelTest.vue')
        }
      },
      {
        path: '/btnGroupTest',
        name: 'BtnGroupTest',
        component: function () {
          return import('../views/BtnGroupTest.vue')
        }
      },
      {
        path: '/transfer',
        name: 'Transfer',
        component: function () {
          return import('../views/TransferTest.vue')
        }
      },
      {
        path: '/importTemplateTest',
        name: 'ImportTemplateTest',
        component: ImportTemplateTest
      },
      {
        path: '/cascaderTest',
        name: 'CascaderTest',
        component:  CascaderTest
      },
      {
        path: '/cityLlistMap',
        name: 'cityLlistMap',
        component: function () {
          return import('../components/map/cityLlistMap.vue')
        }
      },
      {
        path: '/gpsMap',
        name: 'gpsMap',
        component: function () {
          return import('../components/map/gpsMap.vue')
        }
      },
      {
        path: '/pointMap',
        name: 'pointMap',
        component: function () {
          return import('../components/map/pointMap.vue')
        }
      },
      {
        path: '/roadBookMap',
        name: 'roadBookMap',
        component: function () {
          return import('../components/map/roadBookMap.vue')
        }
      },
      {
        path: '/autoCompleteTest',
        name: 'autoCompleteTest',
        component: function () {
          return import('../views/AutoCompleteTest.vue')
        }
      },
      {
        path: '/dingTalkTree',
        name: 'DingTalkTree',
        component: function () {
          return import('../views/DingTalkTree.vue')
        }
      },
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
